Fixed shift bug.

No idea why previous wrong method works.