Backport 44edcd66f49c46c8e7acdc18b653b9685aa2f3f0 to 0.11