Remove the use of inQueueFunc and use getQueuePosFunc instead

Just a minor change by removing inQueueFunc and the use of it. Instead, getQueuePosFunc is used.