compatibility with python3 fix