fix some resource conflict bugs with updating media