fix editPost method