[Fix] Properly clears the history session so history after publish works