some fixes to match the code with Chong's impelementation
some fixes to match the code with Chong's impelementation

indigits/sparse-plex,indigits/sparse-plex,indigits/sparse-plex,indigits/sparse-plex,indigits/sparse-plex