fix bug (chrome-only) in script