Fix error under Python 3