Fix throw error in namespace enumeration