Merged CVS (fixed making do-while loop)