fixed backwards compatability with python 2
Merge branch 'hotfix/0.3.1'