Correct the behavior of ending edit
Add the switch cell