Fixed bug with wall bouncing