Fixed undefined objects in model hierarchy.