Corrected an undefined variable.