Fix priority recomputation