fix #21665: Incorrect values when pasting