Attempt to fix some Firefox bugs