Fixed bug where tag was not sorted in a category correctly