kmi zero denominator fix