Fix priority queue