Bug fixes

Fixes to name mangling