fix media entities structure