fixing media url generation.