Fix wrong variable reference
Merge pull request #2 from DavidS/master

small fixes