Integrate changes from 21ddb82.