Add explicit curly braces on if to maintain code style