s2 while loop condition fix