fix media API changes