Fix incorrect variable name
Merge pull request #361 from kputnam/fix-typo

Fix incorrect variable name (Ch. 2)
Fixed old code usage