Close #142: Fixes for Python 3