fix bug (found while testing the perl port)
Merge pull request #18 from sbertrang/master

Fix typo for better compression
Merge remote-tracking branch 'origin/lastTokenFix' into temp
Merge changes between lastTokenFix and upstream/master