Some python2 fixes.