Added support for undo completion