TESB-10385 Fix last page issue on SAM service side