Fixes to name parsing