made character not go off screen