Merge pull request #2 from alovak/master

fix invalid byte sequence in UTF-8 error
remove unnecessary code