Added a dispatcher to avoid stack overflows in CommandQueue