fix the bug related to the ball movement