Set loading before clearing the datastore to avoid concurrent scrolling event