Work around firefox bug somewhat.