fix to support python2.7