Fixed value not properly returned in mdmcomm.c