Added sort to core collection
Added a catch to avoid duplicated packages when adding dependencies