fixed left/right switchEdge problem