Revert the atexit, as it appears to cause more problems, while not solving any.