fix close_mm_output() to actually unprepare buffers