fix python2 support