fix resolving nested types