Fixed a bug with the viewport not rendering after being resized. Better logic for redrawing the cursor.