Fix python3 support.