small fixes for python2.6