fix metrics sort