fixed some bugs in the repo resolution process