Fixing left and right shifts.