Fixed custom subclass retrieval when initializing a collection