Small generics fixes