Correctly retrieve media url (fixes issue #1)