Fixed bug in scripting module for non-interactive mode.