Fix generics warnings