More $not query fixes