fixed resolving when type is generic