EXISTS/NOT EXISTS fix