fixed a bug when the player gets off the screen