Adapt for FireFox and Safari