dispatcher method memory leak fix