Bug in M to include multiple edges