backport to 1.6