Fix ie8 hanging