fix pagination bug & homepage