fixed where min-max wasn't picking up on correct record at end of job (VBAT-53)