diff --git a/index.html b/index.html
index c725e3c..283565f 100644
--- a/index.html
+++ b/index.html
@@ -258,7 +258,7 @@ async function handlePrimaryButtonClick() {
if (options.slice) {
start = $('#offset').valueAsNumber * $('#chunksize').valueAsNumber;
- end = Math.min(minor || major, $('#chunksize').valueAsNumber);
+ end = Math.min(major, $('#chunksize').valueAsNumber);
}
await Rpc2.invoke('begin', { params: [options, parameters, start, end] });
diff --git a/main.py b/main.py
index 2b277e5..a8a2e83 100644
--- a/main.py
+++ b/main.py
@@ -406,12 +406,12 @@ def main(driver: Chrome, logger = logging.getLogger('main')):
raise Skip()
if options.get('slice'):
- if (items := options.get('subcategories')) and (item := str(cell(index, column.region).value)) not in items:
- logger.info("[%d/%d] Value '%s' not enlisted; skipping '%s'", index-1, limit-1, item, email)
- raise Next()
if index < start or index >= start + end:
logger.info("[%d/%d] Not planned; skipping '%s'", index-1, limit-1, email)
raise Next()
+ if (items := options.get('subcategories')) and (item := str(cell(index, column.region).value)) not in items:
+ logger.info("[%d/%d] Value '%s' not enlisted; skipping '%s'", index-1, limit-1, item, email)
+ raise Next()
if (sent := cell(index, column.sent).value) is not None and str(sent).strip():
logger.info("[%d/%d] Already visited; skipping '%s'", index-1, limit-1, email)