Testing removing session.close() to fix DetachedInstanceError