fix a bug: update post will create a new post instead