fix indexinverteddoconly
fix some bugs