exit test properly