             skin.addItemAt(viewport, 0);
             viewport.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, viewport_propertyChangeHandler);
         }
- 	
+ 	    if (verticalScrollBar)
+            verticalScrollBar.viewport = viewport;
+        if (horizontalScrollBar)
+            horizontalScrollBar.viewport = viewport;
     }
     
     private function uninstallViewport():void
     {
+        if (horizontalScrollBar)
+            horizontalScrollBar.viewport = null;
+        if (verticalScrollBar)
+            verticalScrollBar.viewport = null;        
     	if (skin && viewport)
     	{
     		skin.removeItem(viewport);

    	
}

}
        
        if (instance == verticalScrollBar)
        {
            verticalScrollBar.viewport = null;
            verticalScrollBar.removeEventListener("valueCommit", vsb_valueCommitHandler);
        }
        
        if (instance == horizontalScrollBar)
        {
            horizontalScrollBar.viewport = null;
            horizontalScrollBar.removeEventListener("valueCommit", hsb_valueCommitHandler);
        }
    }
