fixing the wall collisions using the new get/set functions