Fix typo and local var shadowing issue.