python2 and pyp2 fixes