Fix undefined variable when uninstalling an app