Fix a failure when run with Python 3