python2.5 fixes