added Chad's edits manually from his patch-2

thanks Chad https://github.com/chadbunn/MDC/tree/patch-2