Fix exit inside tests.