fix initial loading of data from the api