fix advanceQueue