Fixed an undeclared local variable.