Added curly braces around check for compilation errors.