Rename tername to tname.