fixing tests and type in the rule templates
fixed all advanced tests