Fix generics compiler warnings.