Tentative fix for RT #931518 (fields with 0s).

Please review the changes - this fixes some of the reported bugs with a field containing 0.