Fix bug in the delete post method.