Added some more logging information, handled some extra merge cases.