Various fixes to tag filtering