Fixed some bugs that prevented DMOC code from properly controlling the DMOC.