fixed promise concurrency bug