adding unload() calls to apps