fix a script bug