Cherry-pick issue 4