few bug fixes to get the m_rec code to run