fix err in BP::dfs