fix bug in Ball when touching walls