Backport to 2.6