Implemented a correct pagination component