fixed erroneous exit on zero value calculations