fix undefined $factrec