script bug fixed