Fix meta_data_spec
Fix sorting_spec