TDI-28764: fix a problem with MDM routine