Added support for generic arguments, fixed BaseType when it is generic instance