fix spaces for do...while
More edge cases