python2 fixes. sigh.