Fixed dep sorting.