Fixed a bug that incorrectly checks `rowspan` and `colspan` out of bounds conditions.

Fixed a bug that incorrectly checks `rowspan` and `colspan` out of bounds conditions.
`Incorrect parameters: colspan or rowspan out of bounds`