Fixed undeclared variable bug.
Fix wrong variable name.