A better fix for avoiding console errors in IE.