fix the pasting bug in firefox