Fixed bug bidirectional graph weight is always 1