Update mdhim.c

Sync'd with mdhim-tng