Fix bug in index queue.