do...while mixup in layout