fix trailing newline in clipboard