Fix response override from internal middleware. Put action instances in env.