-fixes for py2.6 and py3.3