exit logic corrected