Fixed issues with find_edges