fix issues due to python 3