Fixed a bug with NHibernate an Autofac