undeclared variable fix