fixed remaining issues with AND NOT