Fixed bug where guards go off of the screen