Fixes on media upload