Added space and missing braces to condition