Fix Hibernate.Initialize null pointer exception