Fix broken python3 support