For ENG-5498, fix deadlock