fix pagination and posts display