Update PriorityCommandQueue.java

Fix issue where in priority queue where if there were one (or more messages) in each queue, the command was rewritten.