Fixed issue #2176
Fixed issue #2056
Fixed issue about managing array of edges and edges taken from the context