Fix variable name typo, closes #826.