fixing waitForVisit