diff --git a/src/backend/access/zedstore/zedstore_attpage.c b/src/backend/access/zedstore/zedstore_attpage.c
index 4c435f2..42ec1c2 100644
--- a/src/backend/access/zedstore/zedstore_attpage.c
+++ b/src/backend/access/zedstore/zedstore_attpage.c
@@ -513,7 +513,7 @@ zsbt_attr_add(Relation rel, AttrNumber attno, attstream_buffer *attbuf)
 			 * modify the existing data. The new combined stream might even be smaller
 			 * than the old stream, if the last codewords are packed more tighthly.
 			 * But at the moment, append_attstreams_inplace() doesn't do anything
-			 * that smart. So we asume that the existing data didn't change, and we
+			 * that smart. So we assume that the existing data didn't change, and we
 			 * only need to WAL log the new data at the end of the stream.
 			 */
 			((PageHeader) origpage)->pd_lower = new_pd_lower;
diff --git a/src/backend/access/zedstore/zedstore_attstream.c b/src/backend/access/zedstore/zedstore_attstream.c
index 4d3ba05..c0c24e7 100644
--- a/src/backend/access/zedstore/zedstore_attstream.c
+++ b/src/backend/access/zedstore/zedstore_attstream.c
@@ -1935,12 +1935,13 @@ decode_chunk_varlen(zstid *lasttid, char *chunk,
 			else
 			{
 				zs_toast_header_external hdr;
+				BlockNumber	toastblkno;
+				varatt_zs_toastptr *toastptr;
 
 				memcpy(&hdr, p, sizeof(zs_toast_header_external));
 				p += sizeof(zs_toast_header_external);
 
-				BlockNumber toastblkno = hdr.toast_blkno;
-				varatt_zs_toastptr *toastptr;
+				toastblkno = hdr.toast_blkno;
 
 				toastptr = palloc0(sizeof(varatt_zs_toastptr));
 				SET_VARTAG_1B_E(toastptr, VARTAG_ZEDSTORE);
diff --git a/src/backend/access/zedstore/zedstore_tuplebuffer.c b/src/backend/access/zedstore/zedstore_tuplebuffer.c
index a771f81..ef45b6f 100644
--- a/src/backend/access/zedstore/zedstore_tuplebuffer.c
+++ b/src/backend/access/zedstore/zedstore_tuplebuffer.c
@@ -361,7 +361,7 @@ zsbt_attbuffer_flush(Relation rel, AttrNumber attno, attbuffer *attbuffer, bool
 	while ((all && chunks->len - chunks->cursor > 0) ||
 		   chunks->len - chunks->cursor > ATTBUFFER_SIZE)
 	{
-		zsbt_attr_add(rel, attno, &attbuffer->chunks);
+		zsbt_attr_add(rel, attno, chunks);
 	}
 }
 
