fix python 3 bug