Fixed the inclusion of Zero value in edge weight matrices