Fix indexing in 2-sample edge case