Fixed bug which caused pasting to not work in firefox.