#2095 fix and automated test for categories and tags