fixing pagination for first page