Fix screen bounds checking