correctly order metadata output