re-add masking of the shift amount based on partition length