fix the promise use