correct end time index for roc computation