sort dependencies for consistency