fix record factory