Corresponding fixes in python.