Improve dispatching resources controller.

Signed-off-by: crynobone <crynobone@gmail.com>