fix return Pending Promise