compileScript fixed