fix shift operations