bugfix on do while