Fixed problem with Hibernate session