fixed problem in pagination