Fix priority management.