fix error with deleting post