fixed for python2.6