Fix for generic type generation