Fixed some bugs with Hibernate configuration.