fix redeclared vars