add missing endscript