Fixed a ``ValueError: Cell is empty`` bug that could happen in some rare edge cases.