attempt to detect exit