Changed paste code for ie

So I couldn't get karma to start phantomjs on windows so this hasn't had the unit tests run. I suspect it might not be 100% coverage anymore as i've added an if branch, we'll see what travis says.