Fix atexit bad references

I think that one was a bug