Added workaround for weirdness on Firefox.