fixing deletion of cMatrix