find the correct max when no records are present