Fix difference between number of records and returned number.