[BAM]Fix: Fixed potential deadlock in realigner