Added braces to a while loop.