fixed problem of deleting post when updating