aded resolution fix on EI search and finishing condition