Exit loop as early as possible