fixed bug with edge weight field initialization