fixed compile errors in scripting