fix a pasting bug in safari