fix bug when parsing types from namespaces