fixes #2690 - undefined method gsub! for nil:NilClass on fact import