fix bug for Firefox and IE