fixed "media" event listener