Yes if the user navigates away and then comes back, there's two instances now. state is kept in the document for a few views so that when you return everything is restored as it was. So all functions need to be scoped to the current view.