logic operator fix