Added a sort to make dependencies sort in a stable way