fixed an undefined variable