fix namespace, inner types, type cast, instanceof