Ensure that pri goes to the lowest value