Added default case and incremented the iterator after adding message to
the queue.