Fix priority handling