Fix to JS for IE