As per your question if its the problem of not finding the id of locators then try using other locators like css and xpath.
Apply selenium.waitforpagetoload when ever you move to a new page or you open a url.
If you are working on an ajax based application then selenium.waitforcondition would be gud to you.
Whereever you think that a locator may take some time to appear after some operation,Use proper waits for those elements.