Correct the bug about updating likes and comments

This commit corrects the bug while liking or commenting
a post was not reflected in the list of posts.