fixed order of variable setting