Fix priority check