bugfix: should not be able to set cursor outside of screen.