Changing priority queue for const references to avoid accidental breaking up queue.