python3 support fix