repositioning now checks that it's not outside the bounds of the screen