Adding bug fix for BSD with directed edges