fixed bug in filtering of tags