Fixed a few bugs in view shift