Lazy loading of classes not working