work around some firefox inconsistencies