Fix edge weights not getting assigned properly, still some edge exceptions to handle in the graph construction