Work on Python 3 support