Fix bugs in edit in IE