Small fix to priority queue