Fixed a few variable references
Merge pull request #89 from morungos/variable-fixes

Fixed a few variable references