'Clear all completed' logic fixed