fix a crash where we tried to tasks to a finished thread (now only append if it's running);