server: added missing parenthesis in if clauses