fix for generic types