fix bugs in firefox