Fix atexit