diff --git a/demo_r1/demo_reports/1.4/1_simple_list.lrxml b/demo_r1/demo_reports/1.4/1_simple_list.lrxml
index 7eb6add..853794a 100644
--- a/demo_r1/demo_reports/1.4/1_simple_list.lrxml
+++ b/demo_r1/demo_reports/1.4/1_simple_list.lrxml
@@ -1,34 +1,38 @@
 
 
-  
diff --git a/demo_r1/demo_reports/1.4/7_change_subband_visibility_by_script.lrxml b/demo_r1/demo_reports/1.4/7_change_subband_visibility_by_script.lrxml
index 0ebccf2..15b6aa0 100644
--- a/demo_r1/demo_reports/1.4/7_change_subband_visibility_by_script.lrxml
+++ b/demo_r1/demo_reports/1.4/7_change_subband_visibility_by_script.lrxml
@@ -1,44 +1,51 @@
 
 
-  
+  
     
     
-      - 
+      - 
         page1
-        
+        
+        
         
-        
-        
+        
         
         
-        
+        
+        
           ReportPage1
-          
+          
           
-            - 
+            - 
               DataBand1
-              
+              
               
-                - 
+                - 
                   TextItem2
-                  
+                  
                   
                   
                   
                   DataBand1
-                  
+                  
                   
+                  
                   
+                  
+                  
                   
                   
                   
                   $S{
-if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master.CompanyName}
+    if ( $D{master.CustomerID} == "ALFKI")     
+            THIS.fontColor=LimeReport.color("red");""}
+     $D{master.CompanyName}
+}
                   
                   
                   
                   
-                  
+                  
                   
                   
                   
@@ -58,17 +65,25 @@ if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master
                   
                   
                   
+                  
+                  
+                  
+                  
+                  
                 -
- 
+                - 
                   TextItem1
-                  
+                  
                   
                   
                   
                   DataBand1
-                  
+                  
                   
+                  
                   
+                  
+                  
                   
                   
                   
@@ -77,7 +92,7 @@ if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master
                   
                   
                   
-                  
+                  
                   
                   
                   
@@ -97,21 +112,33 @@ if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master
                   
                   
                   
+                  
+                  
+                  
+                  
+                  
                 
ReportPage1
-              
+              
               
+              
               
+              
+              
               
               
               
+              
               
               
               
               
+              
+              
+              
               master
               
               
@@ -122,21 +149,25 @@ if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master
               
               
               
+-- 
+            - 
               SubDetailBand1
-              
+              
               
-                - 
+                - 
                   TextItem5
-                  
+                  
                   
                   
                   
                   SubDetailBand1
-                  
+                  
                   
+                  
                   
+                  
+                  
                   
                   
                   
@@ -145,7 +176,7 @@ if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master
                   
                   
                   
-                  
+                  
                   
                   
                   
@@ -165,17 +196,25 @@ if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master
                   
                   
                   
+                  
+                  
+                  
+                  
+                  
                 -
- 
+                - 
                   TextItem6
-                  
+                  
                   
                   
                   
                   SubDetailBand1
-                  
+                  
                   
+                  
                   
+                  
+                  
                   
                   
                   
@@ -184,7 +223,7 @@ if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master
                   
                   
                   
-                  
+                  
                   
                   
                   
@@ -204,65 +243,94 @@ if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master
                   
                   
                   
+                  
+                  
+                  
+                  
+                  
                 
ReportPage1
-              
+              
               
+              
               
+              
+              
               
               
               
+              
               DataBand1
               
               
               
+              
+              
+              
               
               
               
               
               
               
+-          
+          
           
+          
           
+          
+          
           
           
           
           
           
           
-          
+          
           
           
           
+          
+          
+          
+          
+          
+          
+          
+          
+          
+          
+          
+-    
+    
       datasources
       
-- 
+        - 
           
           db
           QSQLITE
-          ./demo_reports/northwind.db
+          /home/alex/Work/C++/Projects/LimeReport/demo_r1/demo_reports/northwind.db
           
           
           
           
           
+          
         
-- 
+        - 
           
           master
           Select * from customers limit 5
@@ -272,24 +340,26 @@ if ( $D{master.CustomerID} == "ALFKI") THIS.fontColor=QColor("red");""}$D{master
       
       
       
+      
     
-    
+    
       
       
-      SubDetailBand1.afterData.connect(SB1AfterData);
+      ReportPage1_SubDetailBand1.afterData.connect(SB1AfterData);
 
 function SB1AfterData(){
    if (getField("master.CustomerID")=="ALFKI") {
         SubDetailBand1.isVisible = false;    
-        TextItem2.fontColor =  QColor("red");
+        TextItem2.fontColor =  LimeReport.color("red");
         TextItem1.content = "sub band is not visible"	
     } else {
-        TextItem5.fontColor = QColor("red");
+        TextItem5.fontColor = LimeReport.color("red");
         TextItem1.content = "sub band is visible"	
     }
 }
 
     
     
+    
   
 
diff --git a/limereport/lrreportrender.cpp b/limereport/lrreportrender.cpp
index 9551811..2ae479b 100644
--- a/limereport/lrreportrender.cpp
+++ b/limereport/lrreportrender.cpp
@@ -606,7 +606,7 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
         if (patternBand->isFooter())
             m_lastRenderedFooter = patternBand;
 
-        bandClone->setBackgroundColor(makeBackgroundColor(patternBand));
+        bandClone->setBackgroundColor(makeBackgroundColor(bandClone));
         patternBand->emitBandRendered(bandClone);
         m_scriptEngineContext->setCurrentBand(bandClone);