fix #5437
Merge pull request #5442 from mlubin/spfix

fix sparse() zero handling