Fixed a bug which caused nested rows or nested rows to appear in the wrong place.