Few py3 compat fixes.