fix: change timing to call unload