Fixed Issue#23 sample_indicies