fix some firefox bugs