fixed an issue with row merging