patch for python2.7