kernel density fix (near boundary / small sample)