incorrect logic operator: fixed crashes