resolve bug in  pagination