fixes to GMat copy