integrate #98 to fix #97, and fix #99
samples
Merge pull request #10 from fabiosantoscode/fixStickyClosest

Fix sticky issues