fixed tiny bug on runScript