Fixed the tests script (third time)

Index must test for >= 0, not for true value.