Fixes to cherrypick owing to code version change