Fix some generics warnings