fix bugs for firefox