Fix a generics problem