Added missing braces to conditionals. [ci skip]