fixed atexit