fix cherrypick code