fix sample on index