Initialize app state consistently