fix bugs about topological sorting and time forward processing
fix bugs about topological sorting and time forward processing