fix for recursive new_name function