for → while
bug fix