some py3 fixes for util