Improved priority handling