Modified fix for IE10 that broke view switching