[FIX] add explicit braces to avoid dangling else