fixed nametab function