Fixed program timeout bug in test script