added guards against loading media 0