Fix a bug in IE and firefox.