fix ndx issues