Merge in add_atexit