fix functions which ignored edge->weight