fix logic operator