Fix bug in getSmoothedProbability
Fix bugs caused by double precision problems and one-valued samples