Fix for #147, allowing for zero values in inputs.