Fix generics usage