Fixed tag display issues

The tags UI is pretty messed up all round. This fix makes it work properly at least on desktop. Mobile needs a lot more love. This is a followup to #1774 and most problems stemming originally from #710