Fixed Off-by-one fix