in base library, fixed typo when limiting by a start and max