Fix for double edges