Some extra Python 3 compatibility.