Fix reversing bug while near a wall.