Fix variable name and typo in comment