remove undefined media attribute