minor fixes
decreased margin
virtual resolution is higher on lower resolution screens
added exceptions to prevent crashing when writing out of bounds