ensures the EntityManager is properly closed