Fix bug in CheckBinaryOperator caused by missing right brace; add braces around if statements to make sure no braces are missing