Fix crash when stopping the player
