Fixed encdoing bug.
Merge pull request #63 from niyaton/fix-encoding-bug

Fixed encdoing bug.