Sort tags to make comparision stable