Fix a bug, modify getAllData flow