Pages and Numbers have generic app icon in Dock
1)  In a Finder window Go to Applications.

2)  Locate the application's icon and do a Get Info.

3)  In the top left corner of the Get Info window the correct non-generic application icon should be displayed.

4)  Select that icon using the mouse.

5)  Do an Edit->Copy on the icon in the top left corner of the window.

6)  Do an Edit->Paste on the icon in the top left corner of the window.

7)  You may have to provide an administrator password.