fixed bugs in FactoriesImporter