use topo sort algorithm to fix dependencies sorting bug
update version