added some more code to fix ie