bug fix: In bfs process every edge if directed