Fix wrong method called on EntityManager