Added promise to make sure data is loaded.