fixed bug

fixed bug and modify index