tag-listing: sql bugfix and style changes