Fix NPE in TaskScriptContainer