Fix generics issue