fixes for python2.6