fixed index path generation bug