*added missing sortRefs call