Fixing the typing rules of logical operators