Fix bugs in BFSForest and BFSMultiControlWidget.