Fix priority and unit test.