Fixed doctrine entity manager.