Applying changeset 0ca6dbaeaf6566ac4991323ac4a1b613fd6b7fed (with modifications)