fixed duplication errors by adding a check for post ids in the post writing section of the store