diff --git a/src/main/resources/META-INF/resources/primefaces/sticky/sticky.js b/src/main/resources/META-INF/resources/primefaces/sticky/sticky.js
index <HASH>..<HASH> 100644
--- a/src/main/resources/META-INF/resources/primefaces/sticky/sticky.js
+++ b/src/main/resources/META-INF/resources/primefaces/sticky/sticky.js
@@ -33,7 +33,7 @@ PrimeFaces.widget.Sticky = PrimeFaces.widget.BaseWidget.extend({
         resizeNS = 'resize.' + this.cfg.id;
 
         win.off(scrollNS).on(scrollNS, function() {
-            if(win.scrollTop() > $this.initialState.top)
+            if(win.scrollTop() > $this.initialState.top - $this.cfg.margin)
                 $this.fix();
             else
                 $this.restore();
@@ -78,4 +78,4 @@ PrimeFaces.widget.Sticky = PrimeFaces.widget.BaseWidget.extend({
         }
     }
 
-});   
\ No newline at end of file
+});
#<I> fix scroll behaviour of sticky with margin > 0