Fixed merge error and problem with transaction threads waiting forever.