Closed broken if block
Corrected test script