Fix Py2-Py3 compat. Add another test case.