fix logical operator