fixed wrong topsort and components tasks