fix NPE in MDC handling