Fixing issues with Generics