Fix problem with records