Adapt to python 3.3