PIM-3244 : fix empty media case