(hopefully) Fixed a crash some users were experiencing when adding media.