fix small index issue