Fix a bug when looping through m_pCompData