Allows graceful exit