[fix] Fix premature exit detection