Fix for py 3
Merge pull request #374 from psychemedia/master

Fix for py 3