Removed inf-loop on rule printing.