Fixed bugs in NameParser