Avoid hitting the walls