Fixed bug when limiting the posts displayed