fixed multiple instantiations of SessionFactory