fix some bugs for firefox but not all