fixed error in handling of generics