fix bugs on firefox