fix difference between python3 to python2