fixes to name decoding