Backport cac07065a6d4571082774f0162e746d6200d37af to 0.11