BATCH-2122: Updated so that offset would be correctly handled at chunk borders