BUg fix where itrative search doesn't end early enough