Fixed compatibility with Python2
Merge pull request #3 from whs/master

Fixed compatibiltiy with Python 2