Test unload function