Fixed bug with getting the wrong repository root