Some py2.6 fixes.

damn tricky :/