Fix tests in Firefox and Safari