Added event upon unload