Added missing parentheses in if clause