[Fix] Crash when number of rows or columns become zero.