Changes to make it working on IE