Bug fix for NOT IN