Fixed bug on python 3