fixes to GMat generics