fix a bug on python3