Magic re-ordering of metadata