Fix a few python2/3 issues