fixed crash caused by inconsistent cell count
Merge pull request #1 from chenyuan/master

fixed crash caused by inconsistent cell count