python3 support fix
Merge pull request #3 from enagorny/speedups

python3 support fix