Fix dispatcher memory leak, add corresponding judger