fix missing initial data and loss of data on page navigation