Compatibility with py3.