Add posts pagination and error correction