Fix errors when create new post.