fixing json and media links