Fixed queue dispatching

Fixed a bug in dispatching to queues
This is to check if a queue resolver is set.