fix undeclared variable typo