fix localname segfault