fixing bug in topo sort