ORM session bug fixed