prevent hitting the wall