fix bug for firefox