Fixed edge resolving bug