fix bug for firefox.