double promise bug repair