fix random test condition