fixing media upload issues