Fixed the bug in merge() failing the unit tests.