[WIP] fixed bug with action variables being overridden