fixed one small bug with pagination