fixed the Pagenation issue