prevent row going outof bounds, which prevents the image 'freezing' when it hits 90 degrees exactly. Closes #23