Need to apply unsigned long cast after % for pedantic errors.