Fix for priority queue activating min as opposed to max