undo functionality fixed for circle