Fix python 3 support, with a bit of luck