fixed bug when the name is not well formed