fix for Python 3, close #2