bugfixes for SCRIPT command