For python 3 fixes