[Fix] Bad condition for the do/while loop