Minor fixes for Python style/compatibility.