Adding changes required to handle MediaReferences.