fixing media upload