Fix bug when moving back and forth between view modes in ie9