Fixed EntityManager reference