More python 2/3 compatibility fixes

There were a few compatibility changes that were missed for python 3.  These changes fixed it for me locally.