handle merged cells

Change-Id: I32c416d89e18d780d852a900f16a35d14531c209