Fix for dynamic ordering of media_resources