Fix dispatcher's memory leak