Fix bugs in splitting sparse values