fixed Promise thread safeness