fixed python2 support