Fix message existence checking.