Nevermind. I found my problem. I wasn't deactivating some dlls before the exit.