Fixed queue extraction bug.