Fixed script not working when run without test parameter.