Backport to 1.9