Bug in code in IE9

Allows code to run in IE9