fixing a few bugs in journal merge