I'm not a big fan of invoke and invoke2. Let's try a more descriptive name for this like `clearPreviousSession` or something.