patch leaking types in PublicApi - references #371