test script bug fix