Only fire callback if exiting

Fixes the case when a user can't exit by clicking on the overlay but the exit event was called anyways