Added braces to 'if' according to the code guidelines