Fix entity manager injection.