more py2 compat fixes