Fix pattern issue when using only one NOT operator