Merge branch 'avoid_negative_shift'