The bug that the last index was not considered in deleteItemPriQ is fixed.