fix undeclared var