Backport to 2.0.x branch