move setScriptOptions() in to separated pull #1319