Fixes up a few issues found with media uploading