Fixed missing semicolon in enclosed macros

The enclosing of a macro in a do-while-loop requires the last statement inside to end with a semicolon.