division by zero

changed the code for avoiding 'division by zero' error in KMF when using the Tutorial and Examples notebook.