a couple small fixes to priorityqueue