AC: added set_local in before filter