diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c
index 060600a556..1a43a08847 100644
--- a/contrib/amcheck/verify_nbtree.c
+++ b/contrib/amcheck/verify_nbtree.c
@@ -1629,8 +1629,9 @@ bt_pivot_tuple_identical(IndexTuple itup1, IndexTuple itup2)
 	if (IndexTupleSize(itup1) != IndexTupleSize(itup2))
 		return false;
 
-	if (memcmp(&itup1->t_tid.ip_posid, &itup2->t_tid.ip_posid,
-			   IndexTupleSize(itup1) - offsetof(ItemPointerData, ip_posid)) != 0)
+	if (memcmp(((char *)itup1 + MAXALIGN(sizeof(IndexTupleData))),
+			   ((char *)itup2 + MAXALIGN(sizeof(IndexTupleData))),
+			   IndexTupleSize(itup1) - MAXALIGN(sizeof(IndexTupleData))) != 0)
 		return false;
 
 	return true;
@@ -1785,7 +1786,7 @@ bt_child_highkey_check(BtreeCheckState *state,
 		rightsplit = P_INCOMPLETE_SPLIT(opaque);
 
 		/*
-		 * If we visit page with high key, check that it is be equal to the
+		 * If we visit page with high key, check that it is equal to the
 		 * target key next to corresponding downlink.
 		 */
 		if (!rightsplit && !P_RIGHTMOST(opaque))
