fix *most* of the issues with the view shifting (thanks @redmunds)