fix media nested bug