make task-dialog thread-safer, fix remove duplicates order