MainActivity should reset everything to an initial state when recreated with a fresh lifecycle
As discussed here it can happen that the system tries to restore the activity in a state such as the QR screen while the process is a fresh one with an unstarted lifecycle. If we do not reset the UI to the initial state, crashes happen.