fixed updated script bug