Updates to merge double matrices