fixed a undeclared variable warning