protect the atexit hooks from random user errors