fixed priority queue tie bug