Fixed a couple bugs in the shift method