Add missing braces diagnostics and fix