Fixed bugs with anchors and graph generation