fixed handling of empty name