improved logic for mass delete, complete and uncomplete to ensure undo can undo a mass change