Fixed add edge updating cost if already present