fix state of dispatcher thread bug