Fixed delete post function