fix bugs result from rule-tagging