Another improvement of python3 compatibility.