Finished fixing priority rules.