Small change in genShiftNum