Fixed exit loop
merged