Backport d32b34cfc455d292a4faef5eb1420874fdb95f74 from grizzly to folsom