fixed empty zindex bug in sparseN