diff --git a/apps/backend/backend_get.c b/apps/backend/backend_get.c
index c4563f1f..b5c634c2 100644
--- a/apps/backend/backend_get.c
+++ b/apps/backend/backend_get.c
@@ -641,6 +641,11 @@ get_list_pagination(clixon_handle h,
int i;
int j;
int ret;
+#ifdef LIST_PAGINATION_REMAINING
+ cxobj *xcache;
+ uint32_t total;
+ uint32_t remaining = 0;
+#endif
if (cbret == NULL){
clixon_err(OE_PLUGIN, EINVAL, "cbret is NULL");
diff --git a/include/clixon_custom.h b/include/clixon_custom.h
index 2c614978..dd5232b4 100644
--- a/include/clixon_custom.h
+++ b/include/clixon_custom.h
@@ -109,7 +109,7 @@
/*! Enable "remaining" attribute (sub-feature of list pagination)
*
- * As defined in draft-wwlh-netconf-list-pagination-00 using Yang metadata value [RFC7952]
+ * See "remaining" annotation defined in module ietf-list-pagination.yang
*/
#undef LIST_PAGINATION_REMAINING
diff --git a/test/test_pagination_draft.sh b/test/test_pagination_draft.sh
index 0309b807..dd4e567c 100755
--- a/test/test_pagination_draft.sh
+++ b/test/test_pagination_draft.sh
@@ -12,6 +12,9 @@ cfg=$dir/conf.xml
fexample=$dir/example-social.yang
fstate=$dir/mystate.xml
+# Set to true if LIST_PAGINATION_REMAINING is enabled
+REMAINING=false
+
# Common example-module spec (fexample must be set)
. ./example_social.sh
@@ -285,13 +288,13 @@ function testlimit()
if [ $i = 0 ]; then
# Note: if REMAINING is enabled:
# if [ $limit == 0 ]; then
- if true; then
- el="$li"
- el2="$li"
- else
+ if ${REMAINING}; then
el="$li"
el2="$li"
jsonmeta=",\"@example-social:uint8-numbers\":\[{\"ietf-list-pagination:remaining\":$remaining}\]"
+ else
+ el="$li"
+ el2="$li"
fi
jsonlist="$li"
else