fixed sort order of spans in view.