resolved divided by zero error before operation