after fixes to do..while condition