Fixed rewrite of posts data when read from db.