Fixing media files handling, attempt 2.