fix the atexit errors that arise during setup