Changed wall collision detection.