fix devided by zero (#190)
fix devided by zero (#190)

* fix devided by zero

* cleanup

qqquinta/nimx,yglukhov/nimx,yglukhov/nimx,qqquinta/nimx,bogdan-voevoda/nimx,yglukhov/nimx,bogdan-voevoda/nimx,qqquinta/nimx,bogdan-voevoda/nimx