Also, make sure your symbol contain the properties...
# xschem
l
Also, make sure your symbol contain the properties @symname and @name. When you place the symbol in your schematic the property @symname will be assigned the cell name (inverter in your schematic) and the property @name will be assign the instance name (X1 in your schematic).