fix getEntityManager