fix  dispatching bug