Fix KneserNeySmoother and add logic for zero denominator