Bug fix in the queue, and improved cmd parser