Added rule priority to resolve conflicts.