fix record relations