Fixed a bug in the Collection Factories