Fix endpoint when branching edges