change Type Collection to work correctly with inner types as well