Generics fix for the adapter to work with the updated matching tree