fixes + testcases for sparse optimizations