Fixing some python2 to 3 errors