Fix some of the python 3 errors