solved problem with pagination in homepage