remove deadend.