Fix instantiating when collections are defined.