fix a bug on by default index