Replace new Collection with CollectionFactory->newInstance().