Corrected an issue with undefined variable.