bad rebase, shr was at the wrong place
fix some usage of shift_left/shift_right