code for mozilla bug fix