Table of contents difficulty

Did you create it using Edit->Copy Special->Copy as ToC and paste in a Table of Contents document? It won’t work to type <$p> directly, for page numbers.