Improve zero-value shortening

Fixes issue #24