fixed post deletion issue (logic error in post model)