Revert "Remove tags sorting"

This reverts commit 6f281ba215ca1f09c4c701e6d76cca039effebb6.