Fixed error thrown when the mouse hits the wall

Still haven't figured out what to do when the shit hits the fan...