fix the "mark task as done" as the previous one does not work well. Implemented undo for it. The previous undo implementation did not work.