Fix some issues on the nHibernateHelper