Fixing generic type signatures