Fixed the issue when the last row is incomplete
Revert "Fixed the issue when the last row is incomplete"

This reverts commit c598b9bab122fea9c2d0fb457612044d8ebb7b21.
Revert "Revert "Fixed the issue when the last row is incomplete""

This reverts commit 04412b7b068a6e3d0cd99c1ae692c942f4be8d9f.