* Corrcted exit logic