Fix a bug which appeared only on Firefox.