Fix Firefox bugs.