undo now works with deletion