fix a typo and rename a variable