allow proper exit