fixed small script bug