bug fix  for python2.4