Fix getQueuePos and getQueuePosNr functions