A few minor fixes for py3k.