Fix a few generics warnings