Fix class removal for IE8+