fix comparator bug, failed in IE