fix error with variable name and typo