Fix priority swapping