Compatibility with python 3.