Adding explicit braces for block statements to avoid compilation errors