solve the bugs in thread and toast