Fixed a few Py2.6 issues.