sort metadata keys