fixed bug with empty name

Bug fix for empty name