Fixed a bug that occurred when commenting out the BFS.