Fixed bugs related rule template rendering