Fix script in Safari