changed test for script_mode